﻿//-----------------------------------------------------------------------
// <copyright file="ClientVersion.cs" company="AFS">
// Copyright (c) AFS. All rights reserved.
//
//    This file is part of Chatbox.
//
//    Chatbox is free software: you can redistribute it and/or modify
//    it under the terms of the GNU Lesser General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    any later version.
//
//    Chatbox is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//    GNU Lesser General Public License for more details.
//
//    You should have received a copy of the GNU Lesser General Public License
//    along with Chatbox. If not, see http://www.gnu.org/copyleft/lesser.html
// </copyright>
//----------------------------------------------------------------------- 

namespace ChatBox.DomainObjects.XmlFeedObjects
{
    /// <summary>
    /// Delegate type for new version
    /// </summary>
    /// <param name="clientVersion">the new version on the server</param>
    public delegate void ClientVersionHandler(ClientVersion clientVersion);

    /// <summary>
    /// A client version from the server
    /// </summary>
    public class ClientVersion
    {
        /// <summary>
        /// Gets or sets the numeric Id of this client
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// Gets or sets the name of the client
        /// </summary>
        public string ClientClass { get; set; }

        /// <summary>
        /// Gets or sets the latest version number 
        /// </summary>
        public string LatestVersion { get; set; }

        /// <summary>
        /// Gets or sets the program home page 
        /// </summary>
        public string Homepage { get; set; }

        /// <summary>
        /// Gets or sets trhe program download link
        /// </summary>
        public string Download { get; set; }

        /// <summary>
        /// Gets or sets the program maintainer E2Link
        /// </summary>
        public Link Maintainer { get; set; }

        /// <summary>
        /// Display for debug 
        /// </summary>
        /// <returns>a string representation of the ClientVersion</returns>
        public override string ToString()
        {
            return this.ClientClass + " " + this.LatestVersion;
        }
    }
}
